#e[Stage]
#Title[NWL ` Collected stories]
#Text[ϑzx񌴈ẴIWiXe[Wł]
#ScriptVersion[2]

script_stage_main {
 let title = 1; //^CgȂtrue
 let titleimg = GetCurrentScriptDirectory~"img\TitleBack.png"; //^Cg摜
 let count = 1; //J[\̏lPɂ
 let plus = 1;

 @Initialize {
  LoadGraphic(titleimg);

  Stage1;
 }

 @MainLoop {
  if(title == 1) {
   ForbidShot(true);
   ForbidBomb(true);
   SetPlayerX(GetCenterX);
   SetPlayerY(GetClipMaxY);
   if(GetKeyState(VK_SHOT) == KEY_PUSH) {
    title = 2;
   }
  }
  else if(title == 2) {
   ForbidShot(true); //Vbg֎~
   ForbidBomb(true); //{֎~
   SetPlayerX(GetCenterX); //vC[xWŒ
   SetPlayerY(GetClipMaxY); //vC[yWŒ
   if(GetKeyState(VK_DOWN) == KEY_PUSH) { //L[ꂽ{}s
    if(count == 1) { //J[\Pꍇ{}s
     count = 2;
    }
    else if(count == 2) { //Qꍇ{}s
     count = 3;
    }
    else if(count == 3) { //Rꍇ{}s
     count = 4;
    }
    else if(count == 4) {
     count = 5;
    }
    else if(count == 5) {
     count = 1;
    }
   }
   else if(GetKeyState(VK_UP) == KEY_PUSH) {
    if(count == 1) {
     count = 5;
    }
    else if(count == 2) {
     count = 1;
    }
    else if(count == 3) {
     count = 2;
    }
    else if(count == 4) {
     count = 3;
    }
    else if(count == 5) {
     count = 4;
    }
   }
   else if(GetKeyState(VK_SHOT) == KEY_PUSH) { //VbgL[ꂽ{}s
    if(count == 1 || count == 2 || count == 3 || count == 4) {
     title = 3; //^CgʏI
    }
    else if(count == 5) {
     ClearStage; //NA
    }
   }
  }
  else if(title == 3) { //^CgȂꍇ
   ForbidShot(false); //Vbg
   ForbidBomb(false); //{
  }

  yield;
 }

 @Finalize {
  DeleteGraphic(titleimg);
 }

 @DrawTopObject {
  if(title == 1) {
   SetTexture(titleimg); //^Cg摜Zbg
   SetGraphicRect(0, 0, 384, 448);
   DrawGraphic(GetCenterX, GetCenterY);
   DrawText("", 70, 80, 150, 255);
   DrawText("", 240, 120, 100, 255);
   DrawText("N", 60, 250, 120, 255);
   DrawText("W", 190, 290, 80, 255);
   DrawText("L", 280, 270, 100, 255);
   DrawText("GAME START", 150, 380, 30, 255);
   DrawText("Let's push shot key", 140, 420, 18, 255);
  }
  else if(title == 2) {
   SetTexture(titleimg);
   SetGraphicRect(0, 0, 384, 448);
   DrawGraphic(GetCenterX, GetCenterY);
   DrawText("", 50, 40 * count, 18, 255);
   DrawText("O(Easy)", 100, 40, 18, 255);
   DrawText("܂͊Tvm邱Ƃ厖", 200, 45, 12, 255);
   DrawText("(Normal)", 100, 80, 18, 255);
   DrawText("͂n܂", 200, 45, 12, 255);
   DrawText("(Hard)", 100, 120, 18, 255);
   DrawText("CȂtɗ", 200, 45, 12, 255);
   DrawText("^(Lunatic)", 100, 160, 18, 255);
   DrawText("ł킦Ȃ", 200, 45, 12, 255);
   DrawText("pȂĂȂ", 100, 200, 18, 255);
  }
 }
#include_function ".\P\stage1.txt"
}